/*
 * ElementoIterator.cpp
 *
 *  Created on: 28/06/2011
 *      Author: javier
 */

#include "ElementoIterator.h"

ElementoIterator::ElementoIterator(IIterator* iterator) {
	this->iterator = iterator;
}

bool ElementoIterator::hasCurrent()
{
	return iterator->hasCurrent();
}

void ElementoIterator::next()
{
	iterator->next();
}

Elemento *ElementoIterator::current()
{
	return (Elemento*) iterator->current();
}

ElementoIterator::~ElementoIterator() {

	iterator->~IIterator();
	delete iterator;

}
